package com.bank.config.contoller;

import com.bank.config.service.EchoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/echo")
public class EchoController {
    protected Logger logger = LoggerFactory.getLogger(EchoController.class);
    @Resource
    private EchoService echoService;

    @RequestMapping(value = "/simple",method = {RequestMethod.GET,RequestMethod.POST})
    public String simple() {

        String result =  echoService.echo("lujie");
        logger.info(result);
        return result;
    }
}
